home *** CD-ROM | disk | FTP | other *** search
/ Windows 32-Bit Gallery / Windows 32-bit Gallery.iso / win95 / winbatch / metertst.wb_ < prev    next >
Text File  |  1996-11-20  |  756b  |  28 lines

  1. ; Sample program to illustrate the use of METER.WBT
  2.  
  3.     Message("Information","METERTST.WBT shows how to meter network software  Inspect file for more information.")
  4.     exit
  5.  
  6.  
  7. ; Prohibit user from cancelling this file
  8. IntControl(12,10,"Close Network Apps before exiting WIndows",0,0)
  9.  
  10.  
  11. ; We need a user name.
  12. ; Logged on user names may be available from the various network
  13. ; Extenders available
  14. user = Environment("USER")
  15. if user == "" then user = "UNKNOWN"
  16.  
  17. meterok = @NO
  18. Call("meter.wbt", "winword ADDUSER %user%") 
  19. If meterok == @NO Then Goto failed
  20. RunWait("winword.exe", "")
  21.  
  22. :cancel
  23. Call("meter.wbt", "winword REMOVEUSER %user%")
  24. Exit
  25.  
  26. :failed
  27. Message("Cannot run Word for Windows", "Too many users?  Try again later.")
  28.